function Parent() {
  this.name = 'Tom'
  this.like = ['running', 'swimming']
}

Child.prototype = new Parent()
function Child() {
  this.age = 18
}

let c = new Child()
let c2 = new Child()
c.like.push('coding')

console.log(c2.like);